package com.zhongyouyun.utils;

import cn.hutool.core.io.FileUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.setting.dialect.Props;

public class PropUtils {

    public static Props get(String name) {

        String filePath = System.getProperty("user.dir");
        String extName = FileUtil.extName(filePath);
        if (StrUtil.isEmpty(extName)) {
            filePath = filePath + "/" + name;
        }
        filePath = filePath + "." + "properties";
        return new Props(filePath);
    }

    public static void main(String[] args) {
        PropUtils.get("properties/file");
    }
}
